Charged particles, such as electrons and ions, can be used to investigate and/or modify a sample, such as a semiconductor sample. Such electrons can be generated, for example, in a scanning electron microscope, and such ions can be generated, for example, in a gas field ion microscope.